import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ken
 * Date: 2023-10-29
 * Time: 9:55
 */
public class Test {
    public static void main(String[] args) {
        int[] arry = new int[]{1,2,3};
        System.out.println(Arrays.toString(arry));
        int[] arr2 = new int[4];
        int[] arr3 =new int[3];
        arr2 = Arrays.copyOf(arry,arry.length);
        System.out.println(Arrays.toString(arr2));
        System.arraycopy(arry,1,arr3,1,arry.length-1);
        System.out.println(Arrays.toString(arr3));
    }

}
